﻿using log4net;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;

namespace Cdx.Ui.App_Start
{
    public class Logger
    {
        static Logger()
        {
            log4net.Config.XmlConfigurator.Configure();
        }

        public static ILog Log
        {
            get 
            {
                StackFrame frame = new StackFrame(1);
                var type = frame.GetMethod().DeclaringType;

                var log = LogManager.GetLogger(type.Name);
                return log;
            }
        }
    }
}